home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1997 January / macpower199701.bin / AMUG / Utilities_48 / TouchMe 1.1.1.sit / touchMe 1.11 Folder / CW9 PP source / source / Common / UFileInfo.h < prev   
Encoding:
Text File  |  1996-08-08  |  1.3 KB  |  52 lines

  1. // ==================================================
  2. //    UFileInfo.h
  3. //    Copyright (C) 1994-96 Mizutori Tetsuya, March 9 1994, July 4 1996.
  4. // ==================================================
  5. //    All documents are pretty-printed in Geneva 10-point font.
  6.  
  7. #pragma once
  8.  
  9. #include <Files.h>
  10.  
  11. typedef enum {
  12.     fileType_Volume    = 1,
  13.     fileType_Folder,
  14.     fileType_File,
  15.     fileType_END
  16. } EFileSpecType;
  17.  
  18.  
  19.  
  20. class    UFileInfo {
  21.  
  22. public:
  23.  
  24.     static OSErr        GetFSSpecDateTime( FSSpec & inFSSpec, 
  25.                         unsigned long & outCreationDate, unsigned long & outModificationDate );
  26.  
  27.     static OSErr        SetFSSpecDateTime( FSSpec & inFSSpec, 
  28.                         unsigned long inCreationDate, unsigned long inModificationDate );
  29.  
  30. private:
  31.  
  32.     static EFileSpecType    GetSpecType( FSSpec & inFSSpec );
  33.  
  34.     static OSErr        TouchDir( const short vRefNum, const long dirID );
  35.  
  36.  
  37.     static OSErr        GetFileDateTime( FSSpec & inFSSpec, 
  38.                         unsigned long & outCreationDate, unsigned long & outModificationDate );
  39.  
  40.     static OSErr        SetFileDateTime( FSSpec & inFSSpec, 
  41.                         unsigned long inCreationDate, unsigned long inModificationDate );
  42.  
  43.     static OSErr        GetFolderDateTime( FSSpec & inFSSpec, 
  44.                         unsigned long & outCreationDate, unsigned long & outModificationDate );
  45.  
  46.     static OSErr        SetFolderDateTime( FSSpec & inFSSpec, 
  47.                         unsigned long inCreationDate, unsigned long inModificationDate );
  48.  
  49. };
  50.  
  51. // end of definitions
  52.